<!doctype html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>系统管理-v1.0</title>
    <link href="/static/plugs/awesome/fonts.css" rel="stylesheet">
    {include file="header"}
    <style>
        .left li {
            float: left;
            font-size: 14px;
            font-weight: bold;
            line-height: 45px;
            margin-right: 1px;
            height: 45px;
            padding: 0px 10px
        }

        .left li.active {
            background-color: cadetblue
        }

        .left a {
            color: #fff;
        }

        .left li:hover {
            background-color: rgb(68, 147, 150)
        }
        .link{margin:50px 0px 0 50px}
        .link li{ color:#fff;background-color: #0088cc;min-width:120px;float:left;margin-right:20px;
            border-radius:5px;padding:10px 20px; text-align: center;font-size:1.2em;font-weight: bold;
        }
        .link li.green{background-color:#009933}
        .module{line-height: 45px;float:left}
        .module a{margin:0 5px}
        .lang img{height:20px;}
    </style>
</head>

<body class="index">
    <!-- 顶部开始 -->
    <div class="container">
        <div class="logo">
            <a href="./index.html">管理系统</a>
        </div>
        <div class="left_open">
            <a><i title="展开左侧栏" class="iconfont">&#xe699;</i></a>
        </div>
        <div class="module">
        <!--<a href="/wadmin/index/cleardata" target="_blank">初始化</a>-->
        </div>
        <ul class="layui-nav right" lay-filter="">
            <li class="layui-nav-item">
                <a href="javascript:;" class="lang flex">
                    <img src="{$country.icon}">
                    <span>{$country.name}</span></a>
                <dl class="layui-nav-child">{foreach $lang as $v}
                    <dd class="lang flex"><a onclick="setLang({$v.id})"><img src="{$v.icon}">
                    <span>{$v.name}</span></a></dd>
                    {/foreach}
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">{$user.name}</a>
                <dl class="layui-nav-child">
                    <!-- 二级菜单 -->
                    <dd><a onclick="xadmin.open('个人信息','/wadmin/admin/password',600,400)">修改密码</a></dd>
                    <dd><a href="/wadmin/login/logout">退出</a></dd>
                </dl>
            </li>
        </ul>
    </div>
    <!-- 顶部结束 -->
    <!-- 中部开始 -->
    <!-- 左侧菜单开始 -->
    <div class="left-nav">
        <div id="side-nav">
            <ul id="nav">{foreach $menu as $v}
                <li>
                   <a href="javascript:;">
                       <i class="{$v.icon}" lay-tips="{$v.title}{$v.id}"></i>
                       <cite>{$v.title}</cite>
                       <i class="iconfont nav_right">&#xe697;</i></a>
                       <ul class="sub-menu{if $v.is_active} opened{/if}">                    
                       {foreach $v.child_menu as $cv}
                       <li>
                           <a onclick="xadmin.add_tab('{$cv.title}','{$cv.url}')">
                               <i class="iconfont">&#xe6a7;</i>
                               <cite>{$cv.title}</cite></a>
                       </li>{/foreach}
                   </ul>
               </li>{/foreach}
           </ul>
        </div>
    </div>
    <!-- <div class="x-slide_left"></div> -->
    <!-- 左侧菜单结束 -->
    <!-- 右侧主体开始 -->
    <div class="page-content">
        <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
            <ul class="layui-tab-title">
                <li class="home">
                    <i class="layui-icon">&#xe68e;</i>控制台
                </li>
            </ul>
            <div class="layui-unselect layui-form-select layui-form-selected" id="tab_right">
                <dl>
                    <dd data-type="this">关闭当前</dd>
                    <dd data-type="other">关闭其它</dd>
                    <dd data-type="all">关闭全部</dd>
                </dl>
            </div>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe src="{:url('wadmin/index/tongji')}" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
                </div>
            </div>
            <div id="tab_show"></div>
        </div>
    </div>
    <div class="page-content-bg"></div>
    <style id="theme_style"></style>
    <!-- 右侧主体结束 -->
    <!-- 中部结束 -->
    <script>
    function setLang(id)
    {
       $.post("{:url('setlang')}",{id:id},function(res){
                    console.log(res)
                    if(res.code==1)
                    {
                        location.reload()
                    }
                    else
                    {
                        layer.msg(res.msg);
                    }
                })
    }
    
        $(function () {

        })
    </script>
</body>

</html>